<template>
	<view>
		<!-- 广告图 -->
		
			<view>
				<image src="../../../static/clazz.jpeg" style="width: 700upx;height: 240upx;margin-left: 25upx;margin-top: 20upx;border-radius: 10upx;"></image>
			</view>
<!-- 		<view class="sizheng" v-if="cokei =='2'">
			<text class="btwz">思政课程</text>
			<view class="sizh">
				<view class="sz_zt" v-for="(item,index) in conte" @click="sizheng(item.id)" :key="index">
					<view class="sz_t">
						<image :src="item.faceUrl" mode="heightFix"></image>
					</view>
					<text class="wenzi">{{item.name}}</text>
				</view>
			</view>
		</view>
		<hengxian v-if="cokei =='2'"></hengxian> -->
		
		<view class="sizheng" v-if="cokei =='2'">
			<text class="btwz">课程思政</text>
			<view class="sizh">
				<view class="sz_zt" v-for="(item,index) in kecon" @click="tz(item.id)" :key="index">
					<view class="sz_t">
						<image :src="item.faceUrl" mode="heightFix"></image>
					</view>
					<text class="wenzi">{{item.name}}</text>
				</view>
			</view>
		</view>
		<!-- 横线 -->
		<!-- <hengxian v-if="cokei =='2'"></hengxian> -->
		
		<!-- 影视资源 -->
<!-- 		<view class="sizheng">
			<text class="btwz">影视资源</text>
			<view class="zybos">
				<scroll-view class="" :scroll-x="true" style="white-space: nowrap;">
					<view class="zy" v-for="(item,index) in jy" @click="yingshi(item.id)">
						<view class="zy_t">
							<image :src="item.faceUrl" mode="widthFix"></image>
						</view>
						<text>{{item.name}}</text>
					</view>
				</scroll-view>
			</view>
		</view> -->
		<!-- 横线 -->
		<!-- <hengxian></hengxian> -->
		
		<!-- 思政刊物-->
<!-- 		<view class="sizheng" >
			<text class="btwz">思政刊物</text>
			<view style="margin-top: 20upx; text-align: center;">
				敬请期待
			</view>
		</view> -->
	</view>
</template>

<script>
	export default{
		data(){
			var con = '/static/clazz.jpeg'
			return{
				con:con,
				conte:[],
				kecon:[],
				jy:[],
				cokei:''
			}
		},
		created() {
			this.cokei = uni.getStorageSync('cokei')
			let that = this
			let params = {
			  "pageNo":1,
			  "pageSize":99999
			}
			that.pyReq(that.$http.getMindClazzList,params,function(res){
					  that.conte = res.result
			});
			// 课程思政
			that.pyReq(that.$http.getClazzMindTypeList,{pageNo:1,pageSize:99999},function(res){
					  that.kecon = res.result
			});
			
			/* 影视 */
			that.pyReq(that.$http.getMovieTypeList,{},function(res){
					  that.jy = res.result
			});
		},
		methods:{
			tz(id){
				uni.navigateTo({
					url:'./list?id='+id
				})
			},
			sizheng(id){
				console.log(id)
				uni.navigateTo({
					url:'./kechenglist?id='+id
				})
			},
			yingshi(id){
				console.log(id)
				uni.navigateTo({
					url:'./jilu?id='+id
				})
			}
			
		}
	}
</script>

<style>
	.sizheng{
		margin-top: 20upx;
	}
	.btwz{
		font-size: 30upx;
		margin-left: 43upx;
	}
	.sizh{
		display: flex;
		flex-wrap: wrap;
		/* justify-content: space-between; */
		padding: 0 23upx;
	}
	.zybos{
		/* display: flex; */
		padding: 0 40upx;
	}
	.zy{
		width: 320upx;
		margin: 20upx 20upx;
		display: inline-block;
	}
	.zy text{
		font-size: 28upx;
		font-weight: 700;
		padding-left: 20upx;
		padding-top: 30upx;
		display: block;
	}
	.zy_t{
		width: 320upx;
		height: 160upx;
		border-radius: 10upx;
		overflow: hidden;
	}
	.sz_t{
		width: 221upx;
		height: 147upx;
		border-radius: 10upx;
		overflow: hidden;
	}
	.sz_t>image{
		display: block;
		height: 147upx;
		margin: 0 auto;
	}
	.sz_zt{
		width: 221upx;
		margin: 20upx 6upx;
	}
		.wenzi{
			display: block;
			text-align: center;
			font-size: 26upx;
			margin-top: 16upx;
			overflow: hidden;
			text-overflow:ellipsis;
			white-space: nowrap;
		}
</style>
